All baseline values of an attribute in current view

Is there a way to view all baseline values of an attribute (for example "object text") for a specific view?

I mean, I want a view that:
1st tab: Object Identifier
2nd tab: Baseline 0.1 value of Object Text
3rd tab: Baseline 1.0 value of Object Text
4rd tab: Current value of Object Text
ozguraltay - Fri Feb 03 09:19:22 EST 2012

Re: All baseline values of an attribute in current view
rain_bow - Fri Feb 03 10:31:41 EST 2012

You have to have dxl code that will open the baselines and then read the attributes

Re: All baseline values of an attribute in current view
ozguraltay - Fri Feb 03 10:58:32 EST 2012

rain_bow - Fri Feb 03 10:31:41 EST 2012
You have to have dxl code that will open the baselines and then read the attributes

Thank u for your reply.

I know that it'll be in that way, but I just need a start, in more details...

Re: All baseline values of an attribute in current view
llandale - Fri Feb 03 11:19:28 EST 2012

The "Current Version" is easy, plow through the History of the object looking for a "modifyAttr" HistoryType that applies the attribute in question, then use the (hst.oldValue) to get what the value was before the 1st change, which is the same as when it was baselined. If there is no such History then there was no change, and it seems to me you would prefer to display nothing.

You probably want to use "diff" to display the difference between the original and current values; useing (hst.plainOldValue) and text = obj."Object Text" to make sure you compare raw text.

Baselines are trickier. You find the Baseline handle you want, open ..err.. load that baseline invisibly, get the absno of the current object and seek that absno in all objects of the baseline. If you load the "Standard view" of the baseline its likely "oBase = object(AbsNo, mBase)" will suffice for searching. Then get the attr value and proceed as above.

This code may get you started:

string DesigDesired = "0.1" // Display value from this baseline
string NameAttr = "Object Text" // Display this attr Value
 
Baseline bl, blFound = null
ModName_ mn = module(current Module)
 
ModuleVersion    mv
string BlVersion
for bl in (current Module) do
{  mv = moduleVersion(mn,bl)
   BlVersion = versionString(mv)
   print BlVersion "\n"
   if (BlVersion == "0.1") then blFound = bl
}
if (!null blFound) then {}// load the baseline and proceed.


-Louie

Re: All baseline values of an attribute in current view
SystemAdmin - Sat Feb 04 17:35:09 EST 2012

ozguraltay - Fri Feb 03 10:58:32 EST 2012
Thank u for your reply.

I know that it'll be in that way, but I just need a start, in more details...

Peter Albert hasn't piped up yet so I have attached a very useful script that Peter posted some time back that should do what you want or at least get you a long way towards what you want.

In short - this is a DXL Layout script that will let you configure and then display any two baselines that you want to compare. So you can create multiple columns in a view, insert & configure this code so that you can see specific baseline compares. It defaults to comparing the Main Column only (Obj Text and Obj Heading) but you can alter the code to compare other attributes. You will need to read the documented instructions at the top of the script very carefully and play around with it.

Paul Miller
Melbourne, Australia
Attachments

attachment_14785993_EnhancedBaselineVersionCompare.dxl

Re: All baseline values of an attribute in current view
Peter_Albert - Mon Feb 06 05:26:17 EST 2012

SystemAdmin - Sat Feb 04 17:35:09 EST 2012
Peter Albert hasn't piped up yet so I have attached a very useful script that Peter posted some time back that should do what you want or at least get you a long way towards what you want.

In short - this is a DXL Layout script that will let you configure and then display any two baselines that you want to compare. So you can create multiple columns in a view, insert & configure this code so that you can see specific baseline compares. It defaults to comparing the Main Column only (Obj Text and Obj Heading) but you can alter the code to compare other attributes. You will need to read the documented instructions at the top of the script very carefully and play around with it.


Paul Miller
Melbourne, Australia

I think the version of the file that Paul has posted only displayed baselined attribute values which had changed w.r.t. the Module version in which it was used. I have attached an updated version of the include file which has some improvements. As I did not want to alter the original routine syntax, you will find a few global variables which you can use to alter the layour column's behaviour.

There is one correction to what Paul has written: The default version of the routine compares / displays all attributes which are displayed in the current View: Show the main column, and in the layout DXL column you will see the baselined Object Heading and Object Text. Add a column with a different attribute, and the layout DXL will also contain this attribute for the selected baseline. You can, however, define the list of attributes to be displayed to be independent of the view, just have a look at the last routine in the include file ("void modifications__compareBaselineWithCurrent()") to see how it is done.

Now, for your specific case I would use a view with the main column and one layout DXL column per baseline - if you want to sequentially list all baseline values in one column, then you would throw in a loop over all baselines.

In each layout DXL column, you would use

#include <../layout/include/versionCompare.inc>
versionCompare__displayAllObjects = true
versionCompare__show_attributeName = false
modifications(false, false, 3, 1, "L")

 


Here,
_versionCompare__displayAllObjects = true_
forces the routine to display attribute values for all objects, not only the ones where the attribute value has changed,

_versionCompare__show_attributeName = false_ removes the attribute name from the displayed text

The first "false" in "modifications(_false_, false, 3, 1, "L")" sets the displayed value to the mere attribute value ("true" would make it display changes with underline / strikethrough),

The second "false" is something which I actually never used ... I think it triggers information about whether a given attribute has been created after the respective baseline,

the last three variables are the major and minor number and the suffix of the baseline.

Hope that helps,

Peter

P.S.: On a similar subject you might want to check out Tony Goodman's Smart History Viewer which shows, in a dialogue box, all changes in all baselines for the current Object. Very useful.

 


Attachments

attachment_14786169_versionCompare.inc

Re: All baseline values of an attribute in current view
ozguraltay - Mon Feb 06 11:35:23 EST 2012

Peter_Albert - Mon Feb 06 05:26:17 EST 2012

I think the version of the file that Paul has posted only displayed baselined attribute values which had changed w.r.t. the Module version in which it was used. I have attached an updated version of the include file which has some improvements. As I did not want to alter the original routine syntax, you will find a few global variables which you can use to alter the layour column's behaviour.

There is one correction to what Paul has written: The default version of the routine compares / displays all attributes which are displayed in the current View: Show the main column, and in the layout DXL column you will see the baselined Object Heading and Object Text. Add a column with a different attribute, and the layout DXL will also contain this attribute for the selected baseline. You can, however, define the list of attributes to be displayed to be independent of the view, just have a look at the last routine in the include file ("void modifications__compareBaselineWithCurrent()") to see how it is done.

Now, for your specific case I would use a view with the main column and one layout DXL column per baseline - if you want to sequentially list all baseline values in one column, then you would throw in a loop over all baselines.

In each layout DXL column, you would use

#include <../layout/include/versionCompare.inc>
versionCompare__displayAllObjects = true
versionCompare__show_attributeName = false
modifications(false, false, 3, 1, "L")

 


Here,
_versionCompare__displayAllObjects = true_
forces the routine to display attribute values for all objects, not only the ones where the attribute value has changed,

_versionCompare__show_attributeName = false_ removes the attribute name from the displayed text

The first "false" in "modifications(_false_, false, 3, 1, "L")" sets the displayed value to the mere attribute value ("true" would make it display changes with underline / strikethrough),

The second "false" is something which I actually never used ... I think it triggers information about whether a given attribute has been created after the respective baseline,

the last three variables are the major and minor number and the suffix of the baseline.

Hope that helps,

Peter

P.S.: On a similar subject you might want to check out Tony Goodman's Smart History Viewer which shows, in a dialogue box, all changes in all baselines for the current Object. Very useful.

 

Paul, Peter...

That was the whole thing I need. Thank you for your support.

With some modifications according to my need, this code will work for me. (It actually works :))

Thank you again...

Re: All baseline values of an attribute in current view
mick.driver - Wed Jun 05 17:08:37 EDT 2013

This sounds similar to my problem .... baseline compare uses the main column (Headings & Object Text).  I would like to filter this by eliminating any object that does not have an attribute set indicating it is an requirement.  Doing this manually from the Compare redline Tab if the numbers are small.    Other wise we export both resulting module of the Baseline compare to Excel and run majic there.  Seems it would be nice to compare baseline modules specifying a particular view?  DXL the only route here ?

Re: All baseline values of an attribute in current view
CostelD - Mon Jul 29 10:12:12 EDT 2013

Peter_Albert - Mon Feb 06 05:26:17 EST 2012

I think the version of the file that Paul has posted only displayed baselined attribute values which had changed w.r.t. the Module version in which it was used. I have attached an updated version of the include file which has some improvements. As I did not want to alter the original routine syntax, you will find a few global variables which you can use to alter the layour column's behaviour.

There is one correction to what Paul has written: The default version of the routine compares / displays all attributes which are displayed in the current View: Show the main column, and in the layout DXL column you will see the baselined Object Heading and Object Text. Add a column with a different attribute, and the layout DXL will also contain this attribute for the selected baseline. You can, however, define the list of attributes to be displayed to be independent of the view, just have a look at the last routine in the include file ("void modifications__compareBaselineWithCurrent()") to see how it is done.

Now, for your specific case I would use a view with the main column and one layout DXL column per baseline - if you want to sequentially list all baseline values in one column, then you would throw in a loop over all baselines.

In each layout DXL column, you would use

#include <../layout/include/versionCompare.inc>
versionCompare__displayAllObjects = true
versionCompare__show_attributeName = false
modifications(false, false, 3, 1, "L")

 


Here,
_versionCompare__displayAllObjects = true_
forces the routine to display attribute values for all objects, not only the ones where the attribute value has changed,

_versionCompare__show_attributeName = false_ removes the attribute name from the displayed text

The first "false" in "modifications(_false_, false, 3, 1, "L")" sets the displayed value to the mere attribute value ("true" would make it display changes with underline / strikethrough),

The second "false" is something which I actually never used ... I think it triggers information about whether a given attribute has been created after the respective baseline,

the last three variables are the major and minor number and the suffix of the baseline.

Hope that helps,

Peter

P.S.: On a similar subject you might want to check out Tony Goodman's Smart History Viewer which shows, in a dialogue box, all changes in all baselines for the current Object. Very useful.

 

Hi Peter, I'm trying to follow the steps you left in the last version of the .inc file posted but I'm getting a syntax error on the 2nd line when copying the script to an Attribute DXL in DOORS. This is the output:

-E- DXL: <Line:2> syntax error

-I- DXL: all done with 1 error and 0 warnings

This is the exact input for the DXL Attribute I use:

#include <include/versionCompare.inc>

versionCompare__displayAllObjects = true

versionCompare__show_attributeName = false

modifications(false, false, 3, 1, "L")

Can you help me figure this one out?

Thank you.

 

 

 


Attachments

example.jpg

Re: All baseline values of an attribute in current view
CostelD - Thu Aug 01 10:09:45 EDT 2013

CostelD - Mon Jul 29 10:12:12 EDT 2013

Hi Peter, I'm trying to follow the steps you left in the last version of the .inc file posted but I'm getting a syntax error on the 2nd line when copying the script to an Attribute DXL in DOORS. This is the output:

-E- DXL: <Line:2> syntax error

-I- DXL: all done with 1 error and 0 warnings

This is the exact input for the DXL Attribute I use:

#include <include/versionCompare.inc>

versionCompare__displayAllObjects = true

versionCompare__show_attributeName = false

modifications(false, false, 3, 1, "L")

Can you help me figure this one out?

Thank you.

 

 

 

Any ideas guys?

Re: All baseline values of an attribute in current view
Mike.Scharnow - Thu Aug 01 12:19:45 EDT 2013

CostelD - Thu Aug 01 10:09:45 EDT 2013

Any ideas guys?

This might be too obvious, but when I load the file into an editor, I see the last lines as in attached picture.

seems that a carriage return sneaked into the last line.

Delete line 611


Attachments

2013-08-01 18_17_39-Downloads_attachment_14786169_versionCom.png

Re: All baseline values of an attribute in current view
CostelD - Fri Aug 02 06:07:49 EDT 2013

Mike.Scharnow - Thu Aug 01 12:19:45 EDT 2013

This might be too obvious, but when I load the file into an editor, I see the last lines as in attached picture.

seems that a carriage return sneaked into the last line.

Delete line 611

Oh, come ooon :)). I didn't even check till the end of the document itself, I thought it was related to the second line in the code...anyway, thank you Mike, of course that was causing the error :)

Now I've got a different problem...I don't get any output in the Baseline Comparison column where I inserted this DXL Layout...nothing at all, even though the DOORS baseline compare functions shows modifications between the 2 baselines I inserted in the calls, baseline 6 and baseline 7. This is what I've inserted:

#include <include/versionCompare.inc>
versionCompare__displayAllObjects = true
versionCompare__show_attributeName = false
modifications(true, true,6,7,"L")

Am I doing something wrong here?

Re: All baseline values of an attribute in current view
Peter_Albert - Mon Aug 12 03:30:27 EDT 2013

CostelD - Fri Aug 02 06:07:49 EDT 2013

Oh, come ooon :)). I didn't even check till the end of the document itself, I thought it was related to the second line in the code...anyway, thank you Mike, of course that was causing the error :)

Now I've got a different problem...I don't get any output in the Baseline Comparison column where I inserted this DXL Layout...nothing at all, even though the DOORS baseline compare functions shows modifications between the 2 baselines I inserted in the calls, baseline 6 and baseline 7. This is what I've inserted:

#include <include/versionCompare.inc>
versionCompare__displayAllObjects = true
versionCompare__show_attributeName = false
modifications(true, true,6,7,"L")

Am I doing something wrong here?

The script does not compare two baselines, but the currently displayed version with a different baseline. Therfore,

modifications(true, true,6,7,"L")

compares the displayed module version to baseline 6.7 ("L"). If you want to cmpare baselines 6 and 7, you have to open baseline 7, add the layout DXL column there, and change the last line to

modifications(true, true,6,0,"")

assuming that baseline 6 has minor number 0 and no suffix.

 

Regards,

     Peter